package com.fable.sp.core.util;

import org.hibernate.cfg.Configuration;
import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.metamodel.source.MetadataImplementor;
import org.hibernate.service.spi.SessionFactoryServiceRegistry;

/**
 * .
 *
 * @author stormning on 16/7/4.
 */
public class HibernateContext {
    static Configuration configuration;
    static SessionFactoryImplementor sessionFactory;
    static SessionFactoryServiceRegistry serviceRegistry;
    static MetadataImplementor metadata;


    public static Configuration getConfiguration() {
        return configuration;
    }

    public static SessionFactoryImplementor getSessionFactory() {
        return sessionFactory;
    }

    public static SessionFactoryServiceRegistry getServiceRegistry() {
        return serviceRegistry;
    }

    public static MetadataImplementor getMetadata() {
        return metadata;
    }
}
